<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="/v2/console/common/taglibs.jsp"%>
<!DOCTYPE HTML>
<html>
<head>
	<link rel="stylesheet" href="${path}/v2/console/css/base.css">
	<link rel="stylesheet" href="${path}/v2/console/css/style.css">
	<script src="${path}/v2/console/js/jquery-1.9.1.min.js"></script>
	<script src="${path}/v2/console/js/globle.js"></script>
</head>
<body>
<div id="wrapper">
	<div class="main">
		<div class="main-right">
			<div class="column-name">
				<h2>栏目管理</h2>
			</div>
			<form id="pageForm" name="form"
				action="${pageContext.request.contextPath}/siteNodeType/siteNodeTypeList.html"
				method="post">
				<div class="main-top">
					<div class="fl">
						<a
							href="${pageContext.request.contextPath}/siteNodeType/toAddSiteNodeType.html"
							class="btn btn-p">新建分类</a>
					</div>
				</div>
				<div class="content">
					<table class="table" width="100%" border="0" cellspacing="0"
						cellpadding="0">
						<thead>
							<tr>
								<th>分类名称</th>
								<th>排序号</th>
								<th>创建时间</th>
								<th>操作</th>
							</tr>
						</thead>
						<tbody>
							<c:forEach items="${page.datasource}" var="data">
							<tr>
								<td>${data.name}</td>
								<td>${data.ord}</td>
								<td><fmt:formatDate value="${data.createTime}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
								<td><a
									href="${pageContext.request.contextPath}/siteNodeType/toUpdateSiteNodeType.html?id=${data.id}"
									id="${data.id}" >修改</a> <a href="javascript:;"
									id="${data.id}" class="remove">删除</a></td>
							</tr>
							</c:forEach>
						</tbody>
					</table>
					<div id="page">
						<%@ include file="/v2/console/common/pageView.jsp"%>
					</div>
				</div>
			</form>
		</div>

		<div class="popBox remove-pop">
			<div class="popBox-back"></div>
			<div class="popBox-box">
				<div class="popBox-con">
					<div class="remove-con">
						<div class="tit">你确定要删除吗？</div>
						<div class="btns">
							<a href="javascript:;" class="btn w144">删 除</a> <a
								href="javascript:;" class="btn-gray w144">取 消</a>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
	<script type="text/javascript">
			$(function(){
				remove();// 删除弹出框
				quxiao();// 弹出框s
			});
		
			// 删除
			function remove(){
				$('.remove').click(function() {
					$('.remove-pop').show();
					$('.remove-pop .btn').attr({'href': '${pageContext.request.contextPath}/siteNodeType/delSiteNodeType.html?id='+this.id});
				});	
			}
			// 弹出框
			function quxiao(){
				var $btn = $('.popBox').find('.btn-gray');
				$btn.click(function() {
					$('.popBox').hide();
				});
			}
		
	</script>
</body>
</html>